package com.example.day07.homework;

import java.nio.charset.StandardCharsets;
import java.util.Locale;

public class StringExercise {
    public static void main(String[] args) {
        String str="abcde";
        System.out.println(str.charAt(1));
        System.out.println(str.codePointAt(1));
        System.out.println(str.codePointBefore(4));
        System.out.println(str.codePointCount(1,4));
        System.out.println(str.compareTo("abc"));
        System.out.println(str.compareToIgnoreCase("ab"));
        System.out.println(str.concat("ab"));
        System.out.println(str.contains("ab"));
        System.out.println(str.contentEquals("ab"));
        System.out.println(str.	contentEquals("qwe"));
        System.out.println(String.copyValueOf(new char[]{'a','b'}));
        System.out.println(String.copyValueOf(new char[]{'a','b'},0,1));
        System.out.println(str.endsWith("e"));
        System.out.println(str.equals("abc"));
        System.out.println(str.equalsIgnoreCase("ddd"));
        System.out.println(String.format(String.valueOf(1),"abccd",args));
        System.out.println(String.format("abcd",args));
        System.out.println(str.getBytes());
        System.out.println(str.getBytes(StandardCharsets.UTF_8));
        //System.out.println(str.getChars(1,2,new char[]{'a','b'},1));
        System.out.println(str.hashCode());
        System.out.println(str.indexOf(1));
        System.out.println(str.indexOf(1,2));
        System.out.println(str.indexOf(str,1));
        System.out.println(str.intern());
        System.out.println(str.isEmpty());
        System.out.println(String.join(str,str));
        System.out.println(String.join(str,"abdsfsf"));
        System.out.println(str.lastIndexOf(4));
        System.out.println(str.lastIndexOf(1,3));
        System.out.println(str.lastIndexOf("abcdf"));
        System.out.println(str.lastIndexOf("ab",2));
        System.out.println(str.length());
        System.out.println(str.matches("abcde"));
        System.out.println(new String("     aaac   ").trim());
        System.out.println(str.toUpperCase(Locale.ROOT));
        System.out.println(str.toString());
        System.out.println(str.toCharArray());
        System.out.println(str.toLowerCase(Locale.ROOT));
        System.out.println(str.startsWith("a"));
        System.out.println(str.replace(str,"asfhjglksls"));
        System.out.println(str.split("b"));
        System.out.println(str.substring(1,3));
        System.out.println(str.subSequence(0,4));


    }
}
